import 'package:equatable/equatable.dart';
import 'package:backend.purchases/domain/entities/yookassa_api/payments/yookassa_api_payment.dart';
import 'package:backend.purchases/domain/entities/yookassa_api/payments/yookassa_api_payment_cancellation_details.dart';
import 'package:backend.purchases/domain/entities/yookassa_api/yookassa_api_money_amount.dart';

class YookassaApiCanceledPayment extends Equatable implements YookassaApiPayment {
  const YookassaApiCanceledPayment({
    required this.id,
    required this.amount,
    required this.purchaseItemSku,
    required this.userId,
    required this.savedPaymentMethodId,
    required this.test,
    required this.cancellationDetails,
  });

  @override
  final String id;

  @override
  final YookassaApiMoneyAmount amount;

  @override
  final String purchaseItemSku;

  @override
  final String userId;

  @override
  final String? savedPaymentMethodId;

  @override
  final bool test;

  final YookassaApiPaymentCancellationDetails cancellationDetails;

  @override
  List<Object?> get props {
    return [
      id,
      amount,
      purchaseItemSku,
      userId,
      savedPaymentMethodId,
      test,
      cancellationDetails,
    ];
  }
}
